package com.edu.spider;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;

import com.edu.spider.controller.TestComponent;

/**
 * @author : ljl
 * @date 创建时间：2018年9月19日 上午9:51:40
 * @version 1.0
 * @parameter
 * @since
 * @return
 */
@SpringBootApplication
@MapperScan("com.edu.spider.mapper")
public class Application extends SpringBootServletInitializer {

	public static void main(String[] args) {
//		SpringApplication.run(Application.class, args);
		ConfigurableApplicationContext context = SpringApplication.run(Application.class, args);
		context.getBean(TestComponent.class).testMail();
		context.close();
	}

	protected SpringApplicationBuilder configure(
			SpringApplicationBuilder builder) {
		return builder.sources(Application.class);
	}
}
